/* 整体页面样式 */
body {
    background-color: #f5f7fa;
}

.detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    min-height: calc(100vh - 180px);
}

/* 返回按钮基础样式 */
.back-button {
    margin: 20px 0;
}

.back-button a {
    color: #4CAF50;
    text-decoration: none;
    font-size: 16px;
}

/* 植物信息卡片样式 */
.plant-info {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.plant-header {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    padding: 2rem;
    background: linear-gradient(to right, #f8f9fa, white);
}

.plant-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.plant-basic-info {
    padding: 1rem;
}

.plant-basic-info h2 {
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.plant-basic-info p {
    font-size: 1.1rem;
    color: #34495e;
    margin: 1rem 0;
    padding: 0.8rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #4CAF50;
}

/* 生长条件样式优化 */
.growing-conditions {
    padding: 2rem;
    border-top: 1px solid #eee;
}

.growing-conditions h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.conditions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.condition-item {
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.condition-item .icon {
    width: 40px;
    height: 40px;
    background: #4CAF50;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* 养护说明样式优化 */
.care-instructions {
    padding: 2rem;
    border-top: 1px solid #eee;
}

.care-instructions h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.care-instructions p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #34495e;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
}

/* 响应式设计优化 */
@media (max-width: 768px) {
    .plant-header {
        grid-template-columns: 1fr;
    }
    
    .plant-image {
        height: 300px;
    }
    
    .detail-container {
        padding: 0 1rem;
    }
    
    .condition-item {
        padding: 1rem;
    }
}

/* 暗色主题优化 */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
    }
    
    .plant-info {
        background: #2d2d2d;
    }
    
    .plant-header {
        background: linear-gradient(to right, #1d1d1d, #2d2d2d);
    }
    
    .plant-basic-info h2 {
        color: #e0e0e0;
    }
    
    .plant-basic-info p {
        color: #b0b0b0;
        background: #1d1d1d;
    }
    
    .condition-item {
        background: #1d1d1d;
    }
    
    .care-instructions p {
        background: #1d1d1d;
        color: #b0b0b0;
    }
    
    .back-button a {
        background: #2d2d2d;
        color: #4CAF50;
    }
}

/* 添加动画效果 */
.plant-info {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 添加滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #4CAF50;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #45a049;
}

/* 防治方案样式优化 */
.treatment-plans {
    margin-top: 2rem;
    padding: 2rem;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.treatment-tabs {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.tab-btn {
    padding: 1rem 2rem;
    border: 2px solid transparent;
    border-radius: 8px;
    background: #f5f5f5;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 1.1rem;
}

.tab-btn:hover {
    background: #e8f5e9;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: #4CAF50;
    color: white;
    box-shadow: 0 4px 12px rgba(76,175,80,0.2);
}

.treatment-content {
    padding: 1.5rem;
    background: #fafafa;
    border-radius: 10px;
}

.treatment-item {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-left: 5px solid #4CAF50;
    background: white;
    border-radius: 0 10px 10px 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.treatment-item h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.treatment-item p {
    color: #34495e;
    line-height: 1.8;
    font-size: 1.1rem;
}

.treatment-item .solution {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.solution-steps {
    list-style: none;
    padding: 0;
}

.solution-steps li {
    margin: 0.8rem 0;
    padding-left: 2rem;
    position: relative;
    color: #2c3e50;
    font-size: 1.1rem;
    line-height: 1.6;
}

.solution-steps li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #4CAF50;
    font-weight: bold;
    font-size: 1.2rem;
}

/* 添加响应式设计 */
@media (max-width: 768px) {
    .treatment-tabs {
        flex-direction: column;
        gap: 1rem;
    }
    
    .tab-btn {
        width: 100%;
        text-align: center;
    }
    
    .treatment-item {
        padding: 1rem;
    }
    
    .treatment-item h4 {
        font-size: 1.2rem;
    }
    
    .treatment-item p,
    .solution-steps li {
        font-size: 1rem;
    }
}

/* 添加暗色主题支持 */
@media (prefers-color-scheme: dark) {
    .treatment-plans {
        background: #1a1a1a;
    }
    
    .tab-btn {
        background: #2d2d2d;
        color: #e0e0e0;
    }
    
    .tab-btn:hover {
        background: #3d3d3d;
    }
    
    .treatment-content {
        background: #1d1d1d;
    }
    
    .treatment-item {
        background: #2d2d2d;
    }
    
    .treatment-item h4 {
        color: #e0e0e0;
    }
    
    .treatment-item p {
        color: #b0b0b0;
    }
    
    .treatment-item .solution {
        background: #1d1d1d;
        border-color: #3d3d3d;
    }
    
    .solution-steps li {
        color: #b0b0b0;
    }
}
